<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>中标目录查看</title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp" %> 
    <!--[if lt IE 9]>
        <script src="lib/js/html5shiv.min.js"></script>
        <script src="lib/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">

    <section class="content-header">
        <h1>中标目录查看</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">药品招标管理</a></li>
            <li class="active"><a href="#">评标管理</a></li>
            <li class="active"><a href="#">中标目录查看</a></li>
        </ol>
    </section>
    <section class="content">
      <form id="form" method="post" class="form-horizontal">
        <div class=" box box-success">
            <div class="box-body">
                <div class="input">
                    <div class="textalign1">项目名称：</div>
                    <div class="boxinput">
                        <select class="textinput" id="projId" name="projId"></select>
                    </div>                  
                    <div class="textalign">类型：</div>
                    <div class="boxinput">
                        <select class="textinput" id="projCat" name="projCat">
                        	<option value="">请选择</option>
                        	<option value="1">招标采购</option>
                        	<option value="2">谈判采购</option>
                        	<option value="3">定点生产</option>
                        	<option value="4">直接采购</option>
                        </select>
                    </div>
                     <div class="textalign">药品编码：</div>
                    <div class="boxinput">
                        <input class="textinput" id="drugCode" placeholder="药品编码" />
                    </div>
                </div>
                <div class="input">
                    <div class="textalign1">通用名：</div>
                    <div class="boxinput">
                        <input type="text" class="textinput" id="qualityspecName" placeholder="通用名"/>
                    </div>
                    <div class="textalign">企业编码：</div>
                    <div class="boxinput">
                        <input type="text" class="textinput" id="compCode" placeholder="企业编码"/>
                    </div>
                    <div class="textalign">企业名：</div>
                    <div class="boxinput">
                        <input type="text" class="textinput" id="compName" placeholder="企业名"/>
                    </div>
                </div>
                <div class="input">
                    <div class="textalign1">类型：</div>
                    <div class="boxinput">
                        <select class="textinput"  id="decryptStatus" name="decryptStatus">
                        	<option value="">请选择</option>
                        	<option value="0">未报价</option>
                        	<option value="2">已解密</option>
                        	<option value="1">未解密</option>
                        </select>
                    </div>
                    <div class="textalign" >
                        <button type="button" onclick="gridSerch();" class="btn btn-success btn-sm">查&nbsp;询</button>
                    </div> 
                </div>           
            
               <!--<div class=" form-inline">               
                	<div class="form-group form-group-xs">
                	    <label for="txtDrugName">项目名称：</label>
					    <select class="form-control" style="width:220px;" id="projId" name="projId"></select>
                	</div>
                	<div class="form-group form-group-xs">
                        <label for="txtDrugForm">类型：</label>
                        <select class="form-control"  id="projCat" name="projCat">
                        	<option value="">请选择</option>
                        	<option value="1">招标采购</option>
                        	<option value="2">谈判采购</option>
                        	<option value="3">定点生产</option>
                        	<option value="4">直接采购</option>
                        </select>
                    </div>
                	<%-- <div class="form-group form-group-xs">
                	    <label for="txtDrugName">项目类型：</label>
					    <select class="form-control" style="width:220px;" id="projCat" name="projCat">
					    <option value="">请选择</option>
					    <c:choose>
					    	<c:when test="${!empty projCatList }">
					    		<c:forEach items="${projCatList }" var="projCatList">
					    			<option value="${projCatList.dicCode }">${projCatList.dicName}</option>
					    		</c:forEach>
					    	</c:when>
					    </c:choose>
					    </select>
                	</div> --%>
                	<div class="form-group form-group-xs">
                    	<label>药品编号：</label>
                        <input class="form-control" type="text" id="drugCode" placeholder="药品编码" />
                    </div>
                    <div class="form-group form-group-xs">
                        <label>通用名：</label>
                        <input class="form-control" type="text" id="qualityspecName" placeholder="通用名" />
                    </div>
                    <div class="form-group form-group-xs">
                    	<label>企业编号：</label>
                        <input class="form-control" type="text" id="compCode" placeholder="企业编码" />
                    </div>
                    <div class="form-group form-group-xs">
                        <label>企业名称：</label>
                        <input class="form-control" type="text" id="compName" placeholder="企业名称" />
                    </div>
                    <div class="form-group form-group-xs">
                        <label for="txtDrugForm">类型：</label>
                        <select class="form-control"  id="decryptStatus" name="decryptStatus">
                        	<option value="">请选择</option>
                        	<option value="0">未申报</option>
                        	<option value="2">已解密</option>
                        	<option value="1">未解密</option>
                        </select>
                    </div>
                     
                    <button type="button" onclick="gridSerch();" class="btn btn-success btn-sm"> 查&nbsp;询</button>
                </div>-->
            </div>
          </div>
        </form>
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        

    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp" %> 
    <script type="text/javascript">
    $(function(){
		$("#projId").HNSelect({
            url: "${pageContext.request.contextPath}/selectController/getDicBidCompany.html", data: { ID: '' }, defaultText: "<option value=''>请选择</option>",
        });
	});
    
    
        
        $(function () {
            $("#gridlist").jqGrid({
                url: "${ctx}/bidScoreRule/getViewProjDrugList.html?isBidding=1",
                mtype: "POST",
                datatype: "json",
                autowidth: true,
                shrinkToFit:false,
                height: 270,
                colNames: [ '项目ID','项目药品ID','bidProjdrugsScoreId', '项目名称', '项目类型','药品编码','通用名','剂型','规格','转换系数','单位','材质','企业编码','企业名称','解密状态','解密价格','解密日期'],
                colModel: [
                    { name: 'projId', width: 60,hidden:true , align:"center" ,sortable: false},
                    { name: 'projProddrugId', width: 80,hidden:true , align:"center" ,sortable: false},
                    { name: 'bidProjdrugsScoreId', width: 120 ,hidden:true, align:"center",sortable: false},
                    
                    { name: 'name', width: 220 , align:"center" ,sortable: false},
                    { name: 'projCat', width: 100 , align:"center" ,sortable: false},
                    { name: 'drugCode', width: 120 , align:"center" ,sortable: false},
                    { name: 'qualityspecName', width: 160 , align:"center" ,sortable: false},
                    { name: 'formName', width: 120 , align:"center" ,sortable: false},
                    { name: 'specName', width: 80 , align:"center" ,sortable: false},
                    { name: 'factor', width: 60 , align:"center" ,sortable: false},
                    { name: 'unit', width: 60 , align:"center" ,sortable: false},
                    { name: 'materialName', width: 60 , align:"center" ,sortable: false},
                    { name: 'compCode', width: 120 , align:"center" ,sortable: false},
                    { name: 'compName', width: 190 , align:"center" ,sortable: false,
                    	formatter:function(cellvalue, options, row){ 
                    		return "<a href=\"javascript:$.HN.dialog.opendialog('"+cellvalue+"','企业详情','${ctx}/stdCompinfo/toStdCompinfoDetailJsp.html?compCodeDetail="+row.compCode+"','800px','400px',function operResult(val){return operResult;})\">"+cellvalue+"</a>"
                    }},
                    { name: 'decryptStatus', width: 80,hidden:true , align:"center" ,sortable: false,
						formatter : function(val, opts,rowdata) {
							var str="";
							if (val == 0) {
								return "未申报";
							}else if (val == 2) {
								return str="已解密";
							}else if (val == 1) {
								return str="未解密";
							}
							return str;
				}},
                    { name: 'decryptPrice', width: 80 , align:"right" ,sortable: false},
                    { name: 'decryptDatetime', width: 80 , align:"center" ,sortable: false}
                ],
                rowNum: 20,
                rowList: [10,20,50,100],
                rownumbers: true,
                pager: "#gridpage",
                viewrecords: true,
                caption: "中标目录列表",
                jsonReader: {
                    repeatitems: false,
                    id: "projId"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");  
        });
        

        //查询
        function gridSerch() {
            var projId = $("#projId").val();
            var projCat = $("#projCat").val();
            var drugCode = $("#drugCode").val();
            var qualityspecName = $("#qualityspecName").val();
            var compCode = $("#compCode").val();
            var compName = $("#compName").val();
            var decryptStatus = $("#decryptStatus").val();
            $("#gridlist").jqGrid('setGridParam',{  
                datatype:'json',
                postData:{
                		"projId":projId,
                		"projCat":projCat,
                		"drugCode":drugCode,
                		"qualityspecName":qualityspecName,
                		"compCode":compCode,
                        "compName":compName,
                        "decryptStatus":decryptStatus}
            }).trigger("reloadGrid"); //重新载入  
        }
        
        
      
	   
 
    </script>
</body>
</html>